package com.emo.wowoblog.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;


@Entity
//解决jackson把json对象返回序列化时，如果属性值有null的情况下，不知道怎么转换了。
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Article extends BaseEntity implements Serializable, Cloneable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int aid; //帖子编号(博文编号)
    private int uid; //发帖子用户编号

    private int browseNumber; //帖子阅读量

    private String title; //帖子的标题
    private String content; //帖子的正文
    private int replyNumber; //回复的数量

    private String tags; //帖子的标签

    private String type; //帖子的类型

    private String catalog; //帖子所属的板块。



}
